#pragma once 

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <stdint.h>

#include "logcplus_layout.h"
#include "logcplus_base_writer.h"

#include <string>
using namespace std;

namespace logcplus
{
    class logcplus_writer_console : public logcplus_base_writer
    {
    public:
        logcplus_writer_console();
        virtual ~logcplus_writer_console();

        virtual int  LogInit();
        virtual int  LogInit(const string& sLogName, int nLogLevel,const string& sLogNode = string());
        virtual int  LogUInit();
        virtual int  LogBegin(uint64_t uLogSeqno = 0);
        virtual void LogCommit();
        virtual void LogWrite(const char* File, const char* Function, int Line,  int Level, const char* LogMsg);
        virtual void LogWrite(const char* sLogText,int nFlag=0);
        
        virtual void Trace(  const char* File, const char* Function, int Line,  const char* Fmt, ...);
        virtual void Debug(  const char* File, const char* Function, int Line,  const char* Fmt, ...);
        virtual void Info(   const char* File, const char* Function, int Line,  const char* Fmt, ...);
        virtual void Warn(   const char* File, const char* Function, int Line,  const char* Fmt, ...);
        virtual void Error(  const char* File, const char* Function, int Line,  const char* Fmt, ...);
        virtual void Fatal(  const char* File, const char* Function, int Line,  const char* Fmt, ...);

        virtual void LogHex( const char* File, const char* Function, int Line,  int Level, const void* data, size_t dataSize );
        virtual void Logger( const char* File, const char* Function, int Line,  int Level, const char* Fmt, ...);
        virtual void WLog(   const char* File, const char* Function, int Line,  int Level, const char* sLogText);
    };
}

